﻿@model Dictionary<string, BuyThePeople.Models.GoodsList>

@{
    ViewBag.Title = "List";
}

<div class="main_container">
	<div class="main_content_list">
        <!--구분선 ----------------------------------------------------------------------->
			<div style="height:50px;">
				<hr style="border:1px dashed #ffeac7; width:100%;"/>
				<span style="font-size:17pt;margin-left:30px;" >최근등록 공동구매</span>					
				<a class="btn btn-mini btn-inverse" href="/Goods/List/1?sort=new">더보기</a>
			</div>
			<!--구분선 ----------------------------------------------------------------------->
		<div class="row-fluid no-space">
            <ul class="thumbnails">
                @foreach (var item in Model["new"].goods) {
              <li class="span3">
                <div class="thumbnail" data-url="/Goods/Detail/@item.GoodsSeq">
                  <img src="@item.Image" alt="상품이미지" />
                  <div class="caption caption_modelname">
                    <span>@Html.DisplayFor(modelItem => item.Title)</span>
                  </div>
				  <div class="caption captionprice" >
                    <span>@string.Format("{0:N0}", item.LowPrice)원</span>
                  </div>
				  <div class="joinmember" >					
					<span>@Model["new"].counts[item.GoodsSeq]<span style="color:#4a4a4a">참여중</span></span>
				  </div>
                    @if(item.RegDate.Value.AddDays(3) > DateTime.Now)
                    {
				  <div class="newicon"></div>
                    }
                </div>
              </li>	
                }
            </ul>
        </div>

        <!--구분선 ----------------------------------------------------------------------->
			<div>
				<hr style="border:1px dashed #ffeac7; width:100%;"/>
				<span style="font-size:17pt;margin-left:30px;" >인기 공동구매</span>	
				<a class="btn btn-mini btn-inverse" href="/Goods/List/1?sort=order">더보기</a>				
			</div>
			<!--구분선 ----------------------------------------------------------------------->

        <div class="row-fluid no-space">
            <ul class="thumbnails">
                @foreach (var item in Model["order"].goods)
                {
              <li class="span3">
                <div class="thumbnail" data-url="/Goods/Detail/@item.GoodsSeq">
                  <img src="@item.Image" alt="상품이미지" />
                  <div class="caption caption_modelname">
                    <span>@Html.DisplayFor(modelItem => item.Title)</span>
                  </div>
				  <div class="caption captionprice" >
                    <span>@string.Format("{0:N0}", item.LowPrice)원</span>
                  </div>
				  <div class="joinmember" >					
					<span>@Model["new"].counts[item.GoodsSeq]<span style="color:#4a4a4a">참여중</span></span>
				  </div>
                    @if(item.RegDate.Value.AddDays(3) > DateTime.Now)
                    {
				  <div class="newicon"></div>
                    }				  
                </div>
              </li>	
                }
            </ul>
        </div>
        
        <!--구분선 ----------------------------------------------------------------------->
		<div>
			<hr style="border:1px dashed #ffeac7; width:100%;"/>
			<span style="font-size:17pt;margin-left:30px;" >종료임박 공동구매</span>		
			<a class="btn btn-mini btn-inverse" href="/Goods/List/1?sort=close">더보기</a>				
		</div>
		<!--구분선 ----------------------------------------------------------------------->

        <div class="row-fluid no-space">
            <ul class="thumbnails">
                @foreach (var item in Model["close"].goods)
                {
              <li class="span3">
                <div class="thumbnail" data-url="/Goods/Detail/@item.GoodsSeq">
                  <img src="@item.Image" alt="상품이미지" />
                  <div class="caption caption_modelname">
                    <span>@Html.DisplayFor(modelItem => item.Title)</span>
                  </div>
				  <div class="caption captionprice" >
                    <span>@string.Format("{0:N0}", item.LowPrice)원</span>
                  </div>
				  <div class="joinmember" >					
					<span>@Model["new"].counts[item.GoodsSeq]<span style="color:#4a4a4a">참여중</span></span>
				  </div>
                    @if(item.RegDate.Value.AddDays(3) > DateTime.Now)
                    {
				  <div class="newicon"></div>
                    }				  
                </div>
              </li>	
                }
            </ul>
        </div>

	</div>    
</div>	

<script>
    (function () {
        $('.thumbnail').click(function () {
            document.location.href = $(this).attr("data-url");
        })
    })();
    
</script>